<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>Admin page - <span py:replace="blog.name">Ponies!!1!one!</span> - <span py:replace="blog.owner.display_name">Sara Swift</span></title>
</head>

<body>

<h1>Admin</h1>

<span py:for="page in [1,2,3]">
    <a py:if="page not in tg.paginate.pages" href="${tg.paginate.get_href(page)}">${page}</a>
</span>
<span py:if="4 not in tg.paginate.pages">
    ...
</span>
<span py:for="page in tg.paginate.pages">
    <a py:if="page != tg.paginate.current_page"
        href="${tg.paginate.get_href(page)}">${page}</a>
    <b py:if="page == tg.paginate.current_page">${page}</b>
</span>
<span py:if="tg.paginate.page_count - 3 not in tg.paginate.pages and tg.paginate.page_count > 3">
    ...
</span>
<span py:if="page > 0" py:for="page in [tg.paginate.page_count - 2, tg.paginate.page_count - 1, tg.paginate.page_count]">
    <a py:if="page not in tg.paginate.pages" href="${tg.paginate.get_href(page)}">${page}</a>
</span>


<table>
  <thead>
    <tr>
      <th>Title</th>
    </tr>
  </thead>
  <tbody>
    <tr py:for="post in posts">
      <td><a href="${tg.url_for('adminpost', post=post)}" py:content="post.title">Post name</a></td>
    </tr>
  </tbody>
</table>

</body>
</html>
